package com.hb0730.boot.admin.modules.sci.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hb0730.boot.admin.modules.sci.model.entity.SciAccount;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Map;
import java.util.Optional;

public interface SciAccountMapper extends BaseMapper<SciAccount> {


    @Update("UPDATE sci_time SET start_time = #{start_time}, end_time = #{end_time} WHERE id = #{id}")
    int updateTime(Map<String, Object> timeAccount);


    @Select("select *  from sci_time")
     Map<String, Object> getTime();

    @Select("select *  from sci_time where start_time <= #{formattedTime} AND end_time >= #{formattedTime}")
    Optional<Boolean> checkTime(String formattedTime);
}
